<template>
  <div>
    <el-card>
      <!-- 添加或删除组件 -->
      <Froms ref="refForms" :dialog="dialog" @refreshList="refreshList"></Froms>
      <!-- 展示数据列表组件 -->
      <Lists ref="refList" :dialog="dialog" @editSpecs="editSpecs"></Lists>
    </el-card>
  </div>
</template>

<script>
import Froms from "./component/Forms.vue";
import Lists from "./component/Lists.vue";
export default {
  components: { Froms, Lists },
  data() {
    return {
      dialog: {
        isShowDialog: false,
      },
    };
  },
  methods: {
    //刷新列表数据
    refreshList() {
      this.$refs.refList.getSpecsListData();
    },
    // 点击编辑展示对话框数据
    editSpecs(id) {
      this.$refs.refForms.getOneSpecsData(id);
    },
  },
};
</script>

<style>
</style>